package tv.finder;

import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class TVFinder extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        // Logic
        // get program list
        
        // Example
        String data = null;
		String url = "http://guidatv.sky.it/app/guidatv/contenuti/data/grid/10_03_10/ch_101.js";
		
		HttpClient client = new DefaultHttpClient();
		HttpGet request = new HttpGet(url);
		try	{
			HttpResponse response = client.execute(request);
			Log.v("LOLLING", response.toString());
		}
		catch(Exception ex)	{
			// TODO
		}
		Log.v("NOT LOLLING","SAD");
        // Example end
        
        //	from net
        //	from db
        // display it
        // if user searches
        //	look for matchups
        // 	display them
        // every 1h look for new days
    }
}